home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / ksa.h.z / ksa.h
C/C++ Source or Header  |  1992-04-03  |  3KB  |  104 lines

  1. /*    Copyright (c) 1984 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8. #ifndef __SYS_KSA_H__
  9. #define __SYS_KSA_H__
  10. #ident    "$Revision: 3.8 $"
  11.  
  12. /*
  13.  * structure ksa defines the data structure of system activity data file
  14.  */
  15. #include "sys/fs/com_pncc.h"    /* for ncmeter */
  16.  
  17. struct pnmeter {
  18.     unsigned long    pathnames;    /* number of pathnames created */
  19.     unsigned long    pathbytes;    /* total pathname bytes used */
  20.     unsigned long    longpaths;    /* number of overlong pathnames */
  21.     unsigned long    maxpath;    /* size of longest pathname */
  22. };
  23.  
  24. /*
  25.  * structs defining private statistics
  26.  */
  27. /*
  28.  * igetstats - stats from iget()/getinode()
  29.  */
  30. struct igetstats {
  31.     unsigned long    ig_attempts;    /* # calls to iget() */
  32.     unsigned long    ig_found;    /* found in hash list */
  33.     unsigned long    ig_fsgone;    /* fs unmounted while getting inode */
  34.     unsigned long    ig_freegets;    /* # times getinode() called */
  35.     unsigned long    ig_oldhashmiss;    /* couldn't get old hash lock */
  36.     unsigned long    ig_ipchg;    /* inode changed while waiting */
  37. };
  38.  
  39. /*
  40.  * getblk /flush stats
  41.  */
  42. struct getblkstats {
  43.     unsigned long    getblks;    /* # getblks */
  44.     unsigned long    getblockmiss;    /* # times b_lock was missed */
  45.     unsigned long    gethlockmiss;    /* # times hash b_lock couldn't be re-aquired */
  46.     unsigned long    getfound;    /* # times buffer found in cache */
  47.     unsigned long    getbchg;    /* # times buffer chged while waiting */
  48.     unsigned long    getloops;    /* # times back to top of getblk */
  49.     unsigned long    getloops2;    /* # times back to loop2 */
  50.     unsigned long    getloops3;    /* # times back to loop3 */
  51.     unsigned long    getoverlap;    /* # times a buffer overlap was found */
  52.     unsigned long    getfree;    /* # times fell thru to freelist code */
  53.     unsigned long    getfreeempty;    /* # times freelist empty */
  54.     unsigned long    getfreehmiss;    /* # times couldn't get old hash */
  55.     unsigned long    getfreealllck;    /* # times all free bufs were locked */
  56.     unsigned long    getfreedelwri;    /* # times all free bufs were DELWRI */
  57.     unsigned long    flush;        /* # times flushing occurred */
  58.     unsigned long    flushloops;    /* # times flushing looped */
  59. };
  60.  
  61. /* Statistics on driver locking */
  62. struct drvlock {
  63.     unsigned long        p_indcdev;
  64.     unsigned long        p_indcdevsw;
  65.     unsigned long        p_indbdev;
  66.     unsigned long        p_indbdevsw;
  67.     unsigned long        p_indstr;
  68.     unsigned long        p_indstrsw;
  69. };
  70.  
  71. struct ksa {
  72.     struct    sysinfo si;    /* defined in /usr/include/sys/sysinfo.h  */
  73.     struct    minfo    mi;    /* defined in /usr/include/sys/sysinfo.h */
  74.     struct    dinfo    di;    /* defined in /usr/include/sys/sysinfo.h */
  75. #ifdef RFS
  76.     struct    rcinfo    ri;    /* defined in /usr/include/sys/sysinfo.h */
  77. #endif
  78.     struct  syserr  se;    /* defined in /usr/include/sys/sysinfo.h */
  79.     struct  pnmeter pmtr;
  80.     struct  ncmeter ncmtr;    /* defined in sys/fs/com_pncc.h */
  81.     struct    igetstats    p_igetstats;
  82.     struct    getblkstats    p_getblkstats;
  83.     struct    drvlock    dlock;
  84. };
  85.  
  86. #ifdef _KERNEL
  87.  
  88. #include "sys/pda.h"    /* for private macro */
  89. #include "sys/immu.h"    /* for PDAPAGE, inside private macro */
  90.  
  91. #define SYSINFO        private.ksaptr->si
  92. #define MINFO        private.ksaptr->mi
  93. #define DINFO        private.ksaptr->di
  94. #define RINFO        private.ksaptr->ri
  95. #define SYSERR        private.ksaptr->se
  96. #define PMTR        private.ksaptr->pmtr
  97. #define NCMETER        private.ksaptr->ncmtr
  98. #define IGETINFO    private.ksaptr->p_igetstats
  99. #define BUFINFO        private.ksaptr->p_getblkstats
  100. #define DRVLOCK        private.ksaptr->dlock
  101.  
  102. #endif /* _KERNEL */
  103. #endif /* __SYS_KSA_H__ */
  104.